﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ecopsy.DataTier;
using AgencyEntityLib.Context;

namespace AgencyEntityLib.BaseEntity
{
    /// <summary>
    /// сотрудник - кнтактное лицо - чуждой организации
    /// </summary>
    public class ContactFace:Face_F 
    {
        private string _Position = string.Empty;
        public virtual string Position { get { return _Position; } set { _Position = value; } }

        private string _ClientID = string.Empty;
        public string ClientID { get { return _ClientID; } set { _ClientID = value; } }
        
        protected override string TagName
        {
            get
            {
                return "ContactFace";
            }
        }

        [EntityNonSerializedAttribute]
        public string ContactsAsString
        {
            get { return ContactList. GetContactsAsString("|"); }
        }

        public  Client GetClient()
        {
            wsFace ws = (wsFace)AgencyLib_GlobalConstants.CurrentAgency.WS_FactoryList[WS_FactoryList.wsKey_Face];
            Client cl = ws.GetClient(ClientID);
            return cl;
        }
    }
}
